zoomToBlock

abstract suspend fun zoomToBlock(block: DesignBlock, paddingLeft: Float = 0.0f, paddingTop: Float = 0.0f, paddingRight: Float = 0.0f, paddingBottom: Float = 0.0f)

Sets the zoom and focus to show a block. Without padding, this results in a tight view on the block. It is set asynchronous to ensure that the block dimensions are known.

Parameters

block

the block that should be focused on.

paddingLeft

optional padding in screen pixels to the left of the block.

paddingTop

optional padding in screen pixels to the top of the block.

paddingRight

optional padding in screen pixels to the right of the block.

paddingBottom

optional padding in screen pixels to the bottom of the block.